﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;

namespace DBModel.DAL
{
    public class WorkApplicationDB
    {
        public static void InsertWorkApplication(WorkApplication workapplicationn)
        {
            DB.Context.WorkApplications.Add(workapplicationn);
        }

        public static bool FindWorkApplication(int userid, int workid)
        {
            return DB.Context.WorkApplications.Where(w => w.ApplicantUserId == userid
                                                          && w.WorkAdvertisementWorkAdvertisementId == workid)
                .Select(w => w).Any();
        }
    }
}
